//Write an application that illustrates how to access a hidden variable.
// Class A declares a static variable x. The class B extends A and declares an instance variable x,
// display() method in class B displays both of these variables.
class A {
    static int x = 10;
}

class B extends A {
    int x = 20;

    void display() {
        System.out.println("Class A static x: " + A.x); // Accessing static variable from class A
        System.out.println("Class B instance x: " + this.x); // Accessing instance variable from class B
    }
}

public class HiddenVariable {
    public static void main(String[] args) {
        var b = new B();
        b.display();
    }
}
